from flask import Flask,request,jsonify,Blueprint
from add_cates import bp_cates

app = Flask(__name__)
# 导入配置文件
from config import Config
# 加载配置文件
app.config.from_object(Config)
#解决跨域
from flask_cors import CORS
CORS(app)
# 导入数据库
from db import db1
# 导入蓝图
from workss import  bp_work
app.register_blueprint(bp_work,url_prefix="/work/")
app.register_blueprint(bp_cates,url_prefix='/cates/')



# 测试添加展示 
@app.route('/test')
def test():
    return 'ok'
    # return res

# 跨域
if __name__ == "__main__":
    app.run(debug=True)